﻿<?php

include("../Modules/conn.php");

$tk = $_SESSION["taikhoan"];

$query = "select MSCB, TEN_CB
			from giang_vien
			where MSBM = '$tk'";
$result = mysql_query($query, $conn) or die(mysql_error());

?>

<script language="javascript">
	function btnClick()
	{
		var cboVal = document.getElementById("cboCB").value;
		location.href = "cnbm_cpanel.php?part=xemdshp&mscb=" + cboVal;
	}
</script>

<table align="center" class="info">
	<tr><td colspan="3"><h4>DANH SÁCH HỌC PHẦN THEO GIẢNG VIÊN</h4> </td> </tr>
	<tr><td class="name">Chọn giảng viên</td><td>
<select name="cboCB" id="cboCB">
	<?php
		while ($row = mysql_fetch_array($result))
		{
			echo '<option value="'.$row["MSCB"].'">'.$row["TEN_CB"].'</option>';
		}
	?>
</select></td>
	<td><input type="button" name="btnSearch" value="Tìm" onclick="btnClick();"></td></tr></table>

<?php

if (isset($_GET["mscb"]))
{
	include("cnbm_xemdshp.php");
}

?>